package com.juc.phaser.phaser12;

import java.util.concurrent.Phaser;

public class ThreadA  extends Thread{
    /**
     * awaitAdvance(0) Interruptibly 是不可中断的 
     */
	private Phaser phaser;
	public ThreadA(Phaser phaser){
		super();
		this.phaser = phaser;
	}
	@Override
	public void run() {
		System.out.println(Thread.currentThread().getName() + " A1 begin = " +System.currentTimeMillis());
		phaser.awaitAdvance(0);
		System.out.println(Thread.currentThread().getName() + " A1 end = " +System.currentTimeMillis());
	}
	
}
